package com.ethink.order.common.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.PurchaseReturnOrderInfo;
import com.ethink.order.api.info.PurchaseReturnOrderModeInfo;
import com.ethink.order.api.model.PurchaseReturnModel;
import com.ethink.order.api.request.PurchaseReturnPageModeQueryRequest;
import com.ethink.order.api.request.PurchaseReturnPageQueryRequest;
import com.ethink.order.common.entity.PurchaseReturnOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 采购退单 Mapper接口
 *
 * @author default
 * @date 2022-12-06
 */
@Mapper
public interface PurchaseReturnOrderMapper extends MyBaseMapper<PurchaseReturnOrder> {

    Page<PurchaseReturnModel> pageQuery(Page buildPage, @Param("request") PurchaseReturnPageQueryRequest request);

    PurchaseReturnOrderInfo selectOneById(Long id);

    /**
     * 货品模式分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<PurchaseReturnOrderModeInfo> pageModeQuery(Page buildPage, @Param("request") PurchaseReturnPageModeQueryRequest request);

}